package wwl.lsf;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MySpringServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //"/index.html"
        //classpath
        String basePath = MySpringServlet.class.getResource("/").getPath();
        String fileName = request.getRequestURI();
        String path = basePath+fileName;
//
//        File file= new File(path);
//        InputStream inputStream = new FileInputStream(file);
//        byte[] bytes = new byte[2048];
//        inputStream.read(bytes);
//        inputStream.close();
        String str = new String("");
        System.out.println(str);
        response.setContentType("text/html");
        response.getWriter().write(str);


    }
}
